﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using BathhouseService.Models.SqlModels;
using BathhouseService.Models.FrameEnumeration;

namespace BathhouseService.CURD.ViewModels.RechargeRecordVMs
{
    public partial class RechargeRecordVM : BaseCRUDVM<RechargeRecord>
    {
        public List<ComboSelectListItem> AllPackageServices { get; set; }
        public List<ComboSelectListItem> AllUsers { get; set; }

        public List<ComboSelectListItem> AllPayWay { get; set; }

        public RechargeRecordVM()
        {
            SetInclude(x => x.PackageService);
        }

        protected override void InitVM()
        {
            AllPackageServices = DC.Set<PackageService>().GetSelectListItems(LoginUserInfo?.DataPrivileges, null, y => y.Name);
            AllUsers = DC.Set<FrameworkUserBase>().GetSelectListItems(LoginUserInfo?.DataPrivileges, null, y => y.Name);
            AllPayWay = DC.Set<PayWay>().GetSelectListItems(LoginUserInfo?.DataPrivileges, null, y => y.Names);
        }

       

       

        public override void DoDelete()
        {
            base.DoDelete();
        }
    }
}
